home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
DISK
/
VORCMP11.ARJ
/
VORCOMP.DOC
< prev
next >
Wrap
Text File
|
1991-02-01
|
36KB
|
1,122 lines
VORCOMP (tm) Program Documentation
Version 1.1
Copyright (C) 1989, 1991 by
Voree Software
5894 Spring Valley Rd.
Burlington, WI 53105
All Rights Reserved
Phone: (414) 763-4522
8 a.m. - 8 p.m. Central Time
February 1, 1991
A DIRECTORY AND FILE GROUP COMPARE UTILITY
- 1 -
TABLE OF CONTENTS
PURPOSE, DISCLAIMER . . . . . . . . . . . . . . . . . . . . 3
QUICK START
Getting Information . . . . . . . . . . . . . . . . . . . . 3
Comparing Two Files . . . . . . . . . . . . . . . . . . . . 4
Comparing Two Groups . . . . . . . . . . . . . . . . . . . 4
Redirecting Output to a File . . . . . . . . . . . . . . . 4
LIMITATIONS . . . . . . . . . . . . . . . . . . . . . . . . . 5
TYPES OF COMPARE . . . . . . . . . . . . . . . . . . . . . . . 5
A File and a File . . . . . . . . . . . . . . . . . . . . . 6
A File and a Directory . . . . . . . . . . . . . . . . . . 6
A Group and a Group . . . . . . . . . . . . . . . . . . . . 6
DISPLAY FORMAT . . . . . . . . . . . . . . . . . . . . . . . . 7
USE OF OPTIONS . . . . . . . . . . . . . . . . . . . . . . . . 9
GENERAL-PURPOSE OPTIONS . . . . . . . . . . . . . . . . . . . 10
DISPLAY OPTIONS . . . . . . . . . . . . . . . . . . . . . . . 11
PAUSE OPTIONS . . . . . . . . . . . . . . . . . . . . . . . . 12
ERROR CODES
Specifying Error Options . . . . . . . . . . . . . . . . . 13
Reporting Error Options . . . . . . . . . . . . . . . . . . 14
ERROR REPORTING
Error Messages . . . . . . . . . . . . . . . . . . . . . . 15
Press and Key to Continue . . . . . . . . . . . . . . . . . 15
ErrorLevel . . . . . . . . . . . . . . . . . . . . . . . . 15
BATCH FILE SUGGESTIONS
Copy All Files . . . . . . . . . . . . . . . . . . . . . . 17
Copy Selected Files . . . . . . . . . . . . . . . . . . . . 17
General-Purpose Copy Command . . . . . . . . . . . . . . . 18
Tested Archive . . . . . . . . . . . . . . . . . . . . . . 18
- 2 -
PURPOSE
This file compare program, called VorComp, was written by
James D. Hajicek. It performs the function of comparing two files
for any differences, or of comparing two complete directories for
differences in contents or differences in the common files.
Groups of files may also be designated for comparison by
the use of wild cards. Complete subdirectory trees may be also
compared. Hidden files, volume labels, and directory attributes
may be included in the comparisons. Many options are available to
control the type of comparisons performed, the display, and the
generated ErrorLevel.
VorComp runs on an IBM PC or compatible computer using
PC-DOS or MS-DOS version 2.0 or greater.
DISCLAIMER
This program has been carefully written and tested. However,
the user of the program is solely responsible for determining if
it is useful and adequate for the intended purpose.
No warranty is expressed or implied.
QUICK START
The following information is provided only to permit a quick
introduction to the use of the program. For many additional
features, refer to the later sections of this manual.
*** GETTING INFORMATION ***
Information about the compare program may be obtained from
the DOS prompt by using the following command:
VORCOMP
with no other parameters. This information includes a short
description of the various options which may also be used with
this program.
- 3 -
*** COMPARING TWO FILES ***
In normal use, two files are compared from the DOS prompt
with the following command:
VORCOMP file1 file2
If desired, the filenames may include a path to the files.
A file may be compared to another file with the same name in
another directory from the DOS prompt with the following command:
VORCOMP file path
*** COMPARING TWO GROUPS ***
Two complete directories are compared from the DOS prompt
with the following command:
VORCOMP path1 path2
The path may include a drive specification, if desired, or may
be only a drive specification.
Any two groups of files may be compared by specifying the two
groups:
VORCOMP group1 group2
where a group may be either an entire directory or a file description
with ? and * wildcards.
*** REDIRECTING OUTPUT TO A FILE ***
As with many utility programs, the screen display output may
be redirected to a disk file to make a more permanent record of
the comparisons:
VORCOMP path1 path2 > filename
VORCOMP path1 path2 >> filename
The second variation above appends to the "filename" file, while
the first overwrites it.
- 4 -
LIMITATIONS
When there are not too many files in the two groups which
are being compared, VorComp 1.1 is capable of running in less
than 25 K bytes of available memory (RAM).
With more available memory, VorComp will allocate additional
memory for its data buffers: up to 64 K bytes for the directory
buffer, up to 64 K bytes for each of two data compare buffers,
and an indeterminate amount of memory for the directory tree when
the /S subdirectory option is used.
With sufficient available memory, the 64 K byte size of the
directory buffer allows for over 2,900 files total in the two
groups being compared. When the /S subdirectory option is used,
the 2,900 file limit applies to each of the directories compared,
but the grand totals may be larger than this.
Double precision (32 bit) arithmetic has been used for grand
total file counts. This allows for large numbers of files on
extremely large disks. In a few places the display format does
not appear to provide room for such large numbers, but in such an
unusual case the numbers will be correct, even if crowding pushes
them out of their normal position on the screen.
The maximum length for a pathname is 79 characters. This
should provide sufficient room for a drive specification, the
longest usable path which DOS allows, and a twelve character
filename. The display of long pathnames will shift around, when
necessary, to make room for them in the display format.
Subdirectory searches, using the /S option, are limited in
depth to 32 levels. This should be sufficient for the longest
usable path which DOS allows.
Any problems with the above restrictions, such as
insufficient memory, too many files, overly long pathnames, or
subdirectory tree depth, will be reported as a "SYSTEM ERROR" and
the program will be halted. Batch files may detect such a system
error by checking for an ErrorLevel of 100. For more information,
see the "Error Reporting" section below.
TYPES OF COMPARE
The VorComp program is called with two parameters in one of
three ways:
1. a file and a file
2. a file and a directory
3. a group and a group
- 5 -
In the first two cases, two individual files are compared.
In the third case, the two complete groups of files are compared.
A "group" is either a directory or else a file specification
using "*" and/or "?" wildcards,
Note that, for example, F* specifies all filenames starting
with the letter F and with no extension. If it is desired to
specify all filenames starting with the letter F and with any
extension, use F*.* instead. This is the same, more rigorous
convention that DOS uses for the COPY and XCOPY commands, but
unlike the DIR command.
The DOS prompt is included in the examples below. In most of
the cases shown, it is C> to indicate the C drive, but observe
carefully the last three examples, where the default directory is
also included in the prompt.
Examples of type 1, a file and a file:
C> VORCOMP FILE1.EXT FILE2.EXT
C> VORCOMP FILE1.EXT A:\PROJECT\FILE2.EXT
Examples of type 2, a file and a directory:
C> VORCOMP FILE.EXT A:
C> VORCOMP FILE.EXT A:\PROJECT
C> VORCOMP A:\PROJECT\FILE.EXT .
Examples of type 3, a group and a group:
C> VORCOMP A: B:
C> VORCOMP A:MONTH??.TXT B:*.TXT
C> VORCOMP A:MONTH??.TXT B:\PAYROLL\*.TXT
C:\> VORCOMP \BUILD\PROJECT \BUILD\TEMP
C:\BUILD> VORCOMP PROJECT TEMP
C:\BUILD\PROJECT> VORCOMP . ..\TEMP
In these examples, note that DOS will use a . as a path
description of the default directory, and will use .. as a path
description of the parent directory one level closer to the root
directory.
- 6 -
In the last three examples, the comparison is performed
on the files in the same two subdirectories, C:\BUILD\PROJECT
and C:\BUILD\TEMP . The difference in the way the commands are
expressed arises in part from the differences in the default
directory when the command is given.
DISPLAY FORMAT
It is difficult in a pure ASCII file like this one to
properly illustrate the VorComp display formats. This section
will be covered in more detail in the printed documentation
booklet given to registered users.
The display format depends upon the type of comparison which
is being performed and upon the options which are used with the
command. The program display is intended to be self-explanatory,
and can be easily learned by simply running the program with
different options.
When two individual files are compared, the display shows
the details of any size differences, date and time differences,
and attribute differences. Dates are shown as month-day-year.
Times are shown as hour:minute:second , where 24 hour time is
used, from 0 to 23 hours.
When two individual files have different data, the first
difference is shown with the offset address from the beginning
of the file, and the data byte from each file. These numbers are
displayed in hexadecimal notation. If the data difference occurs
solely because one of the files is larger than the other, the
missing data byte of the smaller file is shown as "--".
In general, when two groups of files are compared, the
display is in three columns. The first column shows files which
are unique to the first group; the second column shows files
which are unique to the second group; and the third column shows
files which are common to both groups. In a fourth area of the
screen, any differences which are detected in the common files
are displayed.
File differences which are detected include: file size
differences, file data differences, creation date and time
differences, and attribute differences.
Attributes include the following: system file, hidden file,
read-only file, and archive needed. Hidden files and system files
may be compared when specified by directly by name for individual
file comparison, or may be included in group searches when the /H
option is used.
- 7 -
When the /M option is used, more things are included in the
comparisons. That is to say, directories and volume labels are
included for display, creation data and time differences, and
attribute differences. Directories are indicated in the display
by being enclosed in corner brackets < > , and volume labels are
indicated by being enclosed in square brackets [ ] .
When comparing two groups of files on different disk drives,
the output display in some places refers to the groups by using
the letter of each drive. When comparing two groups of files on
the same disk drive, the output display refers to the first group
as "X" and refers to the second group as "Y" regardless of which
drive the files are actually on.
When comparing two groups of files on different disk drives,
using the /S subdirectory option, the output display in some
places refers to the directories by using the letter of each
drive. When comparing two groups of files on the same disk drive,
using the /S subdirectory option, the output display refers to
the first directory group as "U" and refers to the second
directory group as "V" regardless of which drive the files are
actually on.
The bottom of the display shows the totals of the columns.
In order to avoid screen clutter, to make it easier to spot the
significant numbers, zero counts are not displayed. If there are
no differences in the common files whatever, the total difference
counts are replaced with a long line of hyphens where the numbers
would have otherwise been displayed. This line is easy to spot
visually, and provides a quick confirmation that there are no
detected differences.
If there are no differences in the two groups whatsoever,
including the files being in the same order, the display
indicates "PERFECT EQUALITY" beneath the above mentioned line. If
there are no differences in the two groups, except for the order
of the files, the display instead indicates "Different order."
Note that the above mentioned "PERFECT EQUALITY" refers to
equality within the limits of the specified groups. If it is
desired to compare two directories rigorously for differences, it
is suggested that the /M and /H options be used to guarantee that
subdirectories and hidden files are also considered. See the
"General Options" section below.
When subdirectory searches are specified using the /S
option, the above display is performed for each common directory
in the subdirectory tree, and then the grand totals for all of
the subdirectories is displayed.
A "PERFECT EQUALITY" for the grand total of a subdirectory
search using the /S option requires "PERFECT EQUALITY" for each
of the subdirectories in the search, as well as the existence
of no unique subdirectories in either the first or the second
group.
- 8 -
USE OF OPTIONS
With no options specified, the program checks all specified
files for differences in data, time, and attributes. Various
options may be used to modify the selection of files included in
the comparisons and to modify the display format.
A variety of options are available for use with this
program. These options may be in upper case or lower case. They
may be used anywhere on the command line, either before, between,
or after the file and directory names.
The order of the options is not important, but in case of
any conflict the rightmost option overrides earlier ones.
Options usually consist of a forward slash and a letter.
An exception to the above rule is the ErrorLevel option,
which consists of "/E=" followed by some series of letters to
indicate the types of error checking desired. See the "Error
Codes" section below for more information.
Two or more options may be combined into a series by using
one slash and followed by all of the desired options. More than
one series of options is allowed. If the "E=" option is included
in a series, it must be used last in that series.
Examples of the various styles for using options:
VORCOMP /P /Q /H /M A: B:
VORCOMP /P/Q/H/M A: B:
VORCOMP /PQHM A: B:
VORCOMP A: B: /PQHM
VORCOMP A: B: /PQHM /E=XYDT!
VORCOMP A: B: /PQHME=XYDT!
VORCOMP A: B: /SE=XYC'UV?/P
See the "General-Purpose Options" and "Display Options" and
"Error Codes" sections below for more details.
- 9 -
GENERAL-PURPOSE OPTIONS
The general-purpose options are the following:
/Q Quick -- Causes the file data comparisons to consider
the file sizes only, in addition to the time and
attribute comparisons. The actual data within the files
is not compared.
When this option is used, it is possible for two files
to be different, even though they may have the same
size, date, and attributes. The output display will
indicate the ambiguity in the number of different files
by using a "?" for the total or by adding a "+ ?" to the
total.
/H Hidden -- Causes hidden and system files to be included
in the comparisons of two groups. When the /M or /S
option is also used, this causes hidden and system
subdirectories to be included in those functions.
This option is not necessary in order to reference a
hidden file or directory when it is specified directly
by name. The option is only required when it is desired
to find hidden and system files and directories within
some directory or within some group specified with
wildcards.
/M More -- Causes the comparison of two groups to include
subdirectories and volume labels in the output display
and totals. Of course there is no data comparison
performed here, but the time and attributes are
compared.
Directories are indicated in the display by being
enclosed in corner brackets < > , and volume labels are
indicated by being enclosed in square brackets [ ] .
/S Subdirectory Tree -- Causes the comparisons of two
groups to also include comparisons within subdirectories
with common names.
When this option is used, an output display is made
for each directory or subdirectory compared. This is
then followed by a grand total of all the compared
directories.
If a group is specified with wildcards, this option
will cause the same wildcards to be applied to all
of the subdirectories in the tree.
- 10 -
DISPLAY OPTIONS
/T Totals Only - Suppresses intermediate display
information and displays only the totals.
When the /S option is also used, this displays only
the grand totals, and the totals if each individual
directory in the tree is suppressed.
This option may be useful even if the display output is
redirected to the NUL device with the > feature of DOS,
because its use will result in greater speed.
The following four interrelated options control the output
display when two groups are being compared:
/X First Group -- This limits the display to files which
are unique to the first group, but the totals will
correctly include all files. However, if this option is
used without either /C or /D below, then no actual data
comparisons will be performed, just as if the /Q quick
option above had been used.
/Y Second Group -- This limits the display to files which
are unique to the first group, but the totals will
correctly include all files. However, if this option is
used without either /C or /D below, then no actual data
comparisons will be performed, just as if the /Q quick
option above had been used.
/C Common Files -- This limits the display to files which
are common to both groups, but the totals will correctly
include all files.
/D Different -- This limits the display to files which are
common to both groups and which have been identified as
different, but the totals will correctly include all
files.
Significant differences here include data differences,
date and time differences, and attribute differences.
These four options are listed here together because they are
interrelated. They may be used together in combinations. Other
than the /C and /D conflict discussed below, the options are
additive, in that the display output will reflect the composite
of the options selected.
The default combination is /XYC . The use of any of the
options in this set cancels the default combination completely,
and the display is strictly under the control of the options
which are specified.
- 11 -
For example, the combination /XY may be used to display
filenames which are unique to either the first group or to the
second group, but common filenames will not be displayed, and no
data comparisons will be performed.
For example, the combination /XYD will cause the output
display to include all files unique to either group and also all
common files which are different. Common files which are the same
will not be individually displayed, but will be included in the
totals.
For example, the combination /QD will cause the output
display to include only files which are common to the two groups,
and which have a different size, date and time, or attributes,
but no actual data comparisons would be performed.
It should be noted that /C and /D conflict with each other.
If they are both used, the later (rightmost) option will dominate
and cancel the earlier option.
PAUSE OPTIONS
The display pause options are the following:
/P Pause -- Causes the output display to pause when the
screen is full, and at other appropriate times. After
any key press, the next screen of information will be
displayed.
The display will be paused often enough so that summary
displays are not split into pieces. This may result in
more frequent pauses that absolutely necessary, but
gives a more readable display at each pause.
/P= Pause -- The same as above, plus the ability to specify
a custom screen size and/or prompt size.
The default screen size is 25 lines. If a different size
screen is used, it may be specified here with the number
lines. For example: /P=43 .
VorComp looks at the environment variable PROMPT to
determine how many lines long the prompt is by counting
the number of $_ in this string. This may affect the
pause operation on the last display screen. If the
user's computer has an unusual prompt, such as one
containing ANSI commands, and this count is incorrect,
the correct number lines in the prompt may be specified
here. For example: /P=,2 .
Both the screen size and the prompt size may be
specified here together. For example: /P=43,2 .
- 12 -
/P# Pause -- The same as the above, except that the "Press
any key to continue" message is backspaced out of the
display, instead of being left on the screen.
/P#= Pause -- The same as /P# and /P= together. Follow this
with the screen and/or prompt size numbers as above.
ERROR CODES
/E= Error Codes -- This option is used to control the
detection and reporting of differences which will be
considered to be "errors." The option is followed by
any number of specific error codes.
The following is a list of the error codes which generate
error messages if the specified condition is satisfied.
/E=N Never -- This may be used as a dummy place holder.
/E=X Unique First Group File -- Error if there is a file
which is unique to the first group.
/E=Y Unique Second Group File -- Error if there is a file
which is unique to the second group.
/E=C Common File -- Error if there is a common file.
/E=D Data Difference -- Error if there is a common file
which has different size or data.
/E=T Time Difference -- Error if there is a common file
which has different date or time.
/E=A Attribute Difference -- Error if there is a common
file which has different attributes.
/E=O Order Difference -- Error if there are any common
files which appear in a different directory position
in the in the two groups.
/E=U Unique First Group Subdirectory - Error if during a
/S tree search there is a subdirectory which is
unique to the first group.
/E=V Unique Second Group Subdirectory - Error if during a
/S tree search there is a subdirectory which is
unique to the second group.
/E=W Common Subdirectory - Error if during a /S tree
search there is a common subdirectory.
- 13 -
Of the above error codes, the four codes O U V W will never
be true when two individual files are being compared. They can
generate an error only when two groups of files are being
compared.
The following is a special error code which will may be
used immediately after any one of the above error codes. For
example, /E=C' generates an error if there are NO common files.
' This reverses the logic of the previous code.
The following is a list of the error codes which may be used
as an optional termination code to control the way errors are
reported.
/E=. Report Errors, Redirectable, Silent --
If used, must be used last. The error message, if
any, is standard output.
/E=! Report Errors, On Screen, Bell --
If used, must be used last. The error message, if
any, is DOS error output, which will always display
on the screen even if the standard output is
redirected elsewhere by the > or >> feature of DOS.
/E=? Report Errors, On Screen, Bell, Press Any Key to
Continue --
If used, must be used last. The error message and
query, if any, is DOS error output, which will always
display on the screen even if the standard output is
redirected elsewhere by the > or >> feature of DOS.
When more than one of the above error codes is used, they
must be combined in one /E= option statement. For example, if two
directories are being compared, and it is desired to identify any
difference in the contents as an error, the following series
might be used:
/E=XYDTA
If the /E= option is combined with other options, the E=
option must be the last in the series. For example:
VORCOMP A: B: /HSE=DT!
- 14 -
ERROR REPORTING
Errors are reported in three different ways:
1. Using /E=. or /E=!
If the error code series is terminated with a period or an
exclamation mark, and the specified condition occurs, the program
will give a final display output like the following:
********** ERROR ********** DT
Here the letters after the string of asterisks indicate all
of the error codes which generated errors. In the above example
there was a data comparison error and a time comparison error.
2. Using /E=?
If the error code series is terminated with a question mark,
the program will also give a final display output like the above.
In addition, the user will be prompted to press a key before the
program will exit. For example:
********** ERROR ********** DT
Press any key to continue.
This is most useful when VorComp is used within a batch
file, and it is important that the error message not be allowed
to scroll off the screen without the user being aware of a
detected problem. The user may then decide to use a Ctrl-C or a
Ctrl-Break key to stop the continuation of the batch file.
3. Using ERRORLEVEL
When the program exits after the comparison, the ErrorLevel
is set to represent the degree of error. No errors results in an
ErrorLevel of 0. An error generated by the first error code,
results in an ErrorLevel of 1. An error generated by the second
error code results in an ErrorLevel of 2, and so forth.
If more than one error code generates an error, the
ErrorLevel is set to the largest position number of the error
codes which generate an error.
This ErrorLevel is detectable from the DOS prompt or within
a batch file with commands like the following:
IF ERRORLEVEL 5 ECHO At least level five.
- 15 -
From within a batch file, the GOTO with a label is useful.
For example:
IF ERRORLEVEL 5 GOTO ERROR5
...
:ERROR5
ECHO At least level five.
Because the IF ERRORLEVEL command responds to an ErrorLevel
of the specified level or greater, if one wants to detect
different values for the ErrorLevel, one should check for the
higher value first, followed in turn by checks for lower values.
Therefore, it may be desirable to order the error codes after the
/E= option so that the least severe error codes are given first,
followed in turn by the more severe conditions.
For example, if the batch file must make a distinction
between time comparison errors and data comparison errors, and if
a data error is to be considered more severe than a time error,
then the correct order would be /E=TD .
ECHO OFF
VORCOMP A: B: /E=TD
IF ERRORLEVEL 2 GOTO DATAERR
IF ERRORLEVEL 1 GOTO TIMEERR
GOTO END
:DATAERR
ECHO The data is bad.
GOTO END
:TIMEERR
ECHO The data is good, but the time is wrong.
:END
Any serious errors, such as insufficient memory, too many
files, overly long pathnames, directory not found, or any other
errors which prevent the program from performing its job, will
result in an ErrorLevel of 100, higher than any to be expected to
be specified by the /E= option. Any error messages resulting from
such problems will be DOS error output, so that such messages
will be written to the screen and will not be redirected
elsewhere if the > or >> features of DOS are used. The last line
of such error output will be the following:
********** SYSTEM ERROR **********
- 16 -
BATCH FILE SUGGESTIONS
<<< To copy all files to a floppy disk. >>>
The following is a suggestion for a batch file which will
copy all the files in the default directory to a floppy disk,
test the floppy disk, and report the error if the operation is
not performed correctly. An error could occur if the floppy disk
contained read-only files which would not erase, if it filled up,
or if by some fluke the data was written incorrectly.
SAVEALL.BAT
------------------------------
ECHO OFF
ECHO YES | DEL A:*.*
COPY *.* A:
VORCOMP A: . /E=XYDT!
The second line in the above batch file uses the DOS pipe
feature to erase all of the files on the floppy disk and to
automatically answer the usual question about being sure.
<<< To copy selected files to a floppy disk. >>>
The following is an example of a batch file which will copy
selected files to a floppy disk, test the floppy disk, and report
the error if the operations are not performed correctly.
SAVE.BAT
------------------------------
ECHO OFF
ECHO YES | DEL A:*.*
COPY *.ASM A:
COPY *.BAT A:
COPY *.DOC A:
ECHO Testing the backup.
VORCOMP A: *.ASM /QTE=Y? > NUL
VORCOMP A: *.BAT /QTE=Y? > NUL
VORCOMP A: *.DOC /QTE=Y? > NUL
VORCOMP A: *.* /TE=XDT? > NUL
The last four lines in the above batch file use the >
redirection to the NUL device to eliminate the display on the
screen. The first three of these verifies that all of the desired
files were copied, and the forth verifies the actual data.
- 17 -
<<< A general-purpose copy command with error checking. >>>
The following is a suggestion for a batch file which will
copy a group of files from one directory to another, or will copy
an individual file to another file in a different directory or to
a file with a different name. It uses XCOPY and then compares the
result to verify that the copy was performed correctly.
CCOPY.BAT
------------------------------
ECHO OFF
IF "%2" == "" GOTO ERROR
XCOPY %1 %2
IF ERRORLEVEL 1 GOTO ERROR
VORCOMP %1 %2 /E=XDT
IF ERRORLEVEL 1 GOTO ERROR
GOTO END
:ERROR
ECHO *
ECHO ********** ERROR **********
:END
This will verify that the "Compare COPY" command CCOPY has
two parameters after it, which helps avoid accidents which can
be caused if one presses the Enter key to soon. Of course if the
user actually wishes to copy into the default directory, this may
be identified by using the . to represent the current
directory.
The third line from the bottom of the above batch file
appears to contain an asterisk, but what is really wanted here is
an ASCII 255 character from the extended character set, which
gives the same appearance as a space. This is a technique used to
make the ECHO command produce a blank line. In EDLIN and in other
editors such our editor, VOREDIT (tm) from Voree Software, this
character can be entered into a file by typing 255 on the numeric
key pad while the Alt key is being held down.
<<< To perform a tested archive of files. >>>
The following is a suggestion for a batch file which may be
used with the archive program PKZIP (tm) and PKUNZIP (tm) from
PKWARE. This batch file program performs the following steps:
1. Makes sure that the .ZIP file does not already exist.
2. Archives a group of files into a new .ZIP file.
3. Unzips the new archive to a temporary directory.
4. Compares the unzipped files to the original files.
The batch file is used with a command like the following:
ZIP A:NEWFILE *.EXE
which then creates NEWFILE.ZIP on the A: disk containing all of
the .EXE files, and tests the archive.
- 18 -
The purpose of the above sequence is to verify that the
PKZIP creates an archive file which may be faithfully recovered.
It is not intended here to imply that PKZIP or any other specific
data compression program is in any way unreliable. However, if
one has extremely valuable data files, and it is important to be
absolutely certain that the compression and decompression will
not affect the contents of the files, then prudence may be
appropriate. A convenient form of insurance is the use of this
batch file, or a similar one, using VORCOMP to compare the
original files with the compressed and decompressed ones.
ZIP.BAT
------------------------------
ECHO OFF
IF "%2" == "" GOTO ERROR
IF NOT EXIST C:\BAT\TEMP\*.* GOTO ZIP1
ECHO YES | DEL C:\BAT\TEMP\*.* > NUL
:ZIP1
IF EXIST %1.ZIP GOTO ERROR
PKZIP -o %1 %2
PKUNZIP %1 C:\BAT\TEMP
VORCOMP %2 C:\BAT\TEMP /E=XYC'DT
IF ERRORLEVEL 1 GOTO ERROR
IF NOT EXIST C:\BAT\TEMP\*.* GOTO END
ECHO YES | DEL C:\BAT\TEMP\*.* > NUL
GOTO END
:ERROR
ECHO *
ECHO ********** ERROR **********
:END
As in the previous example, the * in the third line from
the bottom should be replaced by the ASCII 255 pseudo-space
character.
This batch file makes use of a temporary directory to
perform some of the work, which in the above batch file is
called C:\BAT\TEMP , but could be some other directory on the
user's hard disk which does not contain any permanent files.
If it is desired to also test the order of the files in the
archive, an O could be included among the error codes.
- 19 -